package com.lzq.aopdemo.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
public class MyAspectDemo {

    @Before("@annotation(com.lzq.aopdemo.aspect.MyAspect)")
    public void before() {
        log.info("MyAspect -> before");
    }

    @After("@annotation(com.lzq.aopdemo.aspect.MyAspect)")
    public void after() {
        log.info("MyAspect -> after");
    }
}
